<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google AJAX Feed API - Blog Preview example</title>
    <script type="text/javascript" src="blogpreview_files/jsapi"></script>
    <script type="text/javascript" src="blogpreview_files/blog.js"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

    function executeSearch() {
      var url = document.getElementById("urltextbox");
      if (!url.value) {
        url.focus();
        return false;
      }
      var blog = new BlogPreview(document.getElementById("blog"));
      blog.show(url.value);
      return false;
    }

    function initialize() {
      var url = document.getElementById("urltextbox");
      url.value = "http://googleajaxsearchapi.blogspot.com/atom.xml";
      executeSearch();
    }
    google.setOnLoadCallback(initialize);

    </script>

    <style type="text/css">

    body {
      background-color: white;
      color: black;
      font-family: Arial, sans-serif;
      font-size: small;
    }

    .blog h2 a, .blog h2 a:visited {
      text-decoration: none;
      color: black;
    }

    .blog .entry {
      margin-bottom: 1.5em;
    }

    .blog .title {
      font-size: medium;
    }

    .blog .author {
      color: gray;
      margin-bottom: 0.5em;
    }

    </style>
  </head>
  <body>
    <form action="" onsubmit="return executeSearch()">
      <input id="urltextbox" type="text" name="url" size="70"/>
      <input type="submit" value="Show Blog Preview"/>
    </form>
    <div id="blog"></div>

  </body>
</html>